student = [('a',11),('b',22),('c',33),('d',44),('e',55),('f',66),('g',77),('h',88),('i',99),('j',100)]

student.sort(key=lambda k: k[1])
for i in range(10):
    print(student[i])



# import random
# score = [random.randint(0,100) for x in range(10)]
# print(score)
# dit1 = { }
# for i in range(len(score)):
#     dit1[i] = score[i]

# print(dit1)
# # sorted()，按值的大小对键排序
# dot2 = sorted(dit1.items(), key=lambda item: item[1], reverse=True)
# for key,value in dot2:
#     print(key ,":",value)
